<?php
include_once('dataBaseConnection.php');
if (isset($_POST['user']) && isset($_POST['pass'])){
	$user  = $_POST['user'];
	$pass = $_POST['pass'];
	$query = "SELECT user, permissions FROM users WHERE user='$user' AND pass='$pass'"; 
	$result = mysqli_query($connection, $query); 
	$row = mysqli_fetch_array($result);
	if ($row) {	 
		$permissions = $row['permissions'];
		include_once('session.php');
	}else{
		header('Location:../index.php?login=false');
	} 
}
?>